#!/usr/bin/env python
# encoding: utf-8
'''
@author: aliax
@license: (C) Copyright 2018-2020.
@contact: 1048327635@qq.com
@file: config.py
@time: 2020/7/8 0008 19:49
@desc:
'''
import logging

"""欢迎页"""

HEADER = """
****************************************************
***            _ _ _____                         ***
***      /\   | (_)  __ \                        ***
***     /  \  | |_| |__) | __ _____  ___   _     ***
***    / /\ \ | | |  ___/ '__/ _ \ \/ / | | |    ***
***   / ____ \| | | |   | | | (_) >  <| |_| |    ***
***  /_/    \_\_|_|_|   |_|  \___/_/\_\\__, |     *** 
***                                     __/ |    ***
***                                    |___/     ***  
****************************************************
  __author__ = 'aliax'  Email = 1048327635@qq.com
"""
"""web API接口设置"""
host_ip = '0.0.0.0'
host_port = 80


""" 数据库配置 """

#数据库类型
DB_TYPE = 'REDIS'
#数据库主机
DB_HOST = '127.0.0.1'
#端口
DB_PORT = 6379
#密码（不填则为空）
DB_PASSWORD = ''

"""请求配置"""

#请求头
headers = {'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36'}
#请求地址
website = {'百度':"https://www.baidu.com",
           '快代理':'https://www.kuaidaili.com/free/inha/{}/',
           '齐云代理':'https://www.7yip.cn/free/?action=china&page={}',
           '云代理':'http://www.ip3366.net/free/?stype=1&page={}',
           '免费代理库':'https://ip.jiangxianli.com/?page={}',
           'ProxyList':'https://list.proxylistplus.com/Fresh-HTTP-Proxy-List-{}',
           'proxylists':'http://www.proxylists.net/http_highanon.txt',
           '开心代理[普匿]':'http://www.kxdaili.com/dailiip/2/{}.html',
           '开心代理[高匿]':'http://www.kxdaili.com/dailiip/1/{}.html',
           '蝶鸟代理':'https://www.dieniao.com/FreeProxy/{}.html',
           '89代理':'http://www.89ip.cn/index_{}.html',
            '小幻代理':'https://ip.ihuan.me/?page={}'
          }
#代理页数
pages = {'快代理':20,'齐云代理':20,'云代理':10,'免费代理库':14,'ProxyList':8,'proxylists':1,'开心代理[普匿]':10,'开心代理[高匿]':9,
         '蝶鸟代理':5,'89代理':20}

"""日志配置"""
logging.basicConfig(level = logging.INFO,format = '[%(asctime)s] - [%(levelname)s] - [%(message)s',datefmt = '%Y-%m-%d %H:%M:%S')
log = logging.getLogger()

"""检测线程配置"""
max_check_thread_all = 30
max_check_thread_useful = 5